{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入需要的工具包\n",
    "\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>resting_blood_pressure</th>\n",
       "      <th>serum_cholestoral</th>\n",
       "      <th>maximum_heart_rate</th>\n",
       "      <th>st_depression</th>\n",
       "      <th>number_major_vessels</th>\n",
       "      <th>target</th>\n",
       "      <th>sex_female</th>\n",
       "      <th>sex_male</th>\n",
       "      <th>chest_pain_type_asymptomatic</th>\n",
       "      <th>...</th>\n",
       "      <th>resting_ele_normal</th>\n",
       "      <th>exercise_induced_angina_no</th>\n",
       "      <th>exercise_induced_angina_yes</th>\n",
       "      <th>st_slope_downsloping</th>\n",
       "      <th>st_slope_flat</th>\n",
       "      <th>st_slope_upsloping</th>\n",
       "      <th>thalassemia_fix defect</th>\n",
       "      <th>thalassemia_normal</th>\n",
       "      <th>thalassemia_reversable defect</th>\n",
       "      <th>thalassemia_unkonwn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>63</td>\n",
       "      <td>145</td>\n",
       "      <td>233</td>\n",
       "      <td>150</td>\n",
       "      <td>2.3</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>37</td>\n",
       "      <td>130</td>\n",
       "      <td>250</td>\n",
       "      <td>187</td>\n",
       "      <td>3.5</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>41</td>\n",
       "      <td>130</td>\n",
       "      <td>204</td>\n",
       "      <td>172</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>56</td>\n",
       "      <td>120</td>\n",
       "      <td>236</td>\n",
       "      <td>178</td>\n",
       "      <td>0.8</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>57</td>\n",
       "      <td>120</td>\n",
       "      <td>354</td>\n",
       "      <td>163</td>\n",
       "      <td>0.6</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   age  resting_blood_pressure  serum_cholestoral  maximum_heart_rate  \\\n",
       "0   63                     145                233                 150   \n",
       "1   37                     130                250                 187   \n",
       "2   41                     130                204                 172   \n",
       "3   56                     120                236                 178   \n",
       "4   57                     120                354                 163   \n",
       "\n",
       "   st_depression  number_major_vessels  target  sex_female  sex_male  \\\n",
       "0            2.3                     0       1           0         1   \n",
       "1            3.5                     0       1           0         1   \n",
       "2            1.4                     0       1           1         0   \n",
       "3            0.8                     0       1           0         1   \n",
       "4            0.6                     0       1           1         0   \n",
       "\n",
       "   chest_pain_type_asymptomatic  ...  resting_ele_normal  \\\n",
       "0                             1  ...                   1   \n",
       "1                             0  ...                   0   \n",
       "2                             0  ...                   1   \n",
       "3                             0  ...                   0   \n",
       "4                             0  ...                   0   \n",
       "\n",
       "   exercise_induced_angina_no  exercise_induced_angina_yes  \\\n",
       "0                           1                            0   \n",
       "1                           1                            0   \n",
       "2                           1                            0   \n",
       "3                           1                            0   \n",
       "4                           0                            1   \n",
       "\n",
       "   st_slope_downsloping  st_slope_flat  st_slope_upsloping  \\\n",
       "0                     0              0                   1   \n",
       "1                     0              0                   1   \n",
       "2                     1              0                   0   \n",
       "3                     1              0                   0   \n",
       "4                     1              0                   0   \n",
       "\n",
       "   thalassemia_fix defect  thalassemia_normal  thalassemia_reversable defect  \\\n",
       "0                       0                   1                              0   \n",
       "1                       1                   0                              0   \n",
       "2                       1                   0                              0   \n",
       "3                       1                   0                              0   \n",
       "4                       1                   0                              0   \n",
       "\n",
       "   thalassemia_unkonwn  \n",
       "0                    0  \n",
       "1                    0  \n",
       "2                    0  \n",
       "3                    0  \n",
       "4                    0  \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#导入预处理后的数据集\n",
    "\n",
    "processed_df = pd.read_csv('processed_heart.csv')\n",
    "processed_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "训练特征的大小: (212, 26)\n",
      "训练标签的大小: (212,)\n",
      "测试特征的大小: (91, 26)\n",
      "测试标签的大小: (91,)\n"
     ]
    }
   ],
   "source": [
    "#切分数据集\n",
    "\n",
    "X = processed_df.drop('target',axis  = 1)\n",
    "y = processed_df['target']\n",
    "\n",
    "#将数据集切分为测试集和训练集\n",
    "from sklearn.model_selection import train_test_split\n",
    "X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.3,random_state = 0)\n",
    "\n",
    "print('训练特征的大小:',X_train.shape)\n",
    "print('训练标签的大小:',y_train.shape)\n",
    "print('测试特征的大小:',X_test.shape)\n",
    "print('测试标签的大小:',y_test.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',\n",
       "            max_depth=5, max_features='auto', max_leaf_nodes=None,\n",
       "            min_impurity_decrease=0.0, min_impurity_split=None,\n",
       "            min_samples_leaf=1, min_samples_split=2,\n",
       "            min_weight_fraction_leaf=0.0, n_estimators=100, n_jobs=None,\n",
       "            oob_score=False, random_state=0, verbose=0, warm_start=False)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#建立随机森林模型\n",
    "\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "\n",
    "RF = RandomForestClassifier(n_estimators = 100,max_depth = 5,random_state = 0)\n",
    "RF.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "#从测试集中选择一个数据进行测试\n",
    "\n",
    "test_sample = X_test.iloc[5].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_sample = test_sample.reshape(1,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "模型的预测结果: [0]\n",
      "该样本的真实结果: 0\n"
     ]
    }
   ],
   "source": [
    "predict_result = RF.predict(test_sample)\n",
    "print('模型的预测结果:',predict_result)\n",
    "print('该样本的真实结果:',y_train.iloc[5])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.55777398, 0.44222602]])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#模型的定量预测结果\n",
    "RF.predict_proba(test_sample)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0,\n",
       "       0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0,\n",
       "       1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1,\n",
       "       1, 1, 0], dtype=int64)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#模型在测试集上的定性预测结果\n",
    "RF.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.74389287, 0.25610713],\n",
       "       [0.40255383, 0.59744617],\n",
       "       [0.43306131, 0.56693869],\n",
       "       [0.98096444, 0.01903556],\n",
       "       [0.7919676 , 0.2080324 ],\n",
       "       [0.55777398, 0.44222602],\n",
       "       [0.78280153, 0.21719847],\n",
       "       [0.90032869, 0.09967131],\n",
       "       [0.96922812, 0.03077188],\n",
       "       [0.94651037, 0.05348963],\n",
       "       [0.43040398, 0.56959602],\n",
       "       [0.05069312, 0.94930688],\n",
       "       [0.91825507, 0.08174493],\n",
       "       [0.07465252, 0.92534748],\n",
       "       [0.06725272, 0.93274728],\n",
       "       [0.33063348, 0.66936652],\n",
       "       [0.72564842, 0.27435158],\n",
       "       [0.15415977, 0.84584023],\n",
       "       [0.93082891, 0.06917109],\n",
       "       [0.37546538, 0.62453462],\n",
       "       [0.09555627, 0.90444373],\n",
       "       [0.66680159, 0.33319841],\n",
       "       [0.67943042, 0.32056958],\n",
       "       [0.68677184, 0.31322816],\n",
       "       [0.19439952, 0.80560048],\n",
       "       [0.53830654, 0.46169346],\n",
       "       [0.7080598 , 0.2919402 ],\n",
       "       [0.61531975, 0.38468025],\n",
       "       [0.04776584, 0.95223416],\n",
       "       [0.16598493, 0.83401507],\n",
       "       [0.33902518, 0.66097482],\n",
       "       [0.89806815, 0.10193185],\n",
       "       [0.03303899, 0.96696101],\n",
       "       [0.27485286, 0.72514714],\n",
       "       [0.04217599, 0.95782401],\n",
       "       [0.32762678, 0.67237322],\n",
       "       [0.87079583, 0.12920417],\n",
       "       [0.11194176, 0.88805824],\n",
       "       [0.7322325 , 0.2677675 ],\n",
       "       [0.50172062, 0.49827938],\n",
       "       [0.45100376, 0.54899624],\n",
       "       [0.33498006, 0.66501994],\n",
       "       [0.13341779, 0.86658221],\n",
       "       [0.81787702, 0.18212298],\n",
       "       [0.47071507, 0.52928493],\n",
       "       [0.31457662, 0.68542338],\n",
       "       [0.14957924, 0.85042076],\n",
       "       [0.5662995 , 0.4337005 ],\n",
       "       [0.97915293, 0.02084707],\n",
       "       [0.3049418 , 0.6950582 ],\n",
       "       [0.14550041, 0.85449959],\n",
       "       [0.35543245, 0.64456755],\n",
       "       [0.11939026, 0.88060974],\n",
       "       [0.35881024, 0.64118976],\n",
       "       [0.04649765, 0.95350235],\n",
       "       [0.79578796, 0.20421204],\n",
       "       [0.1776074 , 0.8223926 ],\n",
       "       [0.17212627, 0.82787373],\n",
       "       [0.14752217, 0.85247783],\n",
       "       [0.04797099, 0.95202901],\n",
       "       [0.18315783, 0.81684217],\n",
       "       [0.02018535, 0.97981465],\n",
       "       [0.19461079, 0.80538921],\n",
       "       [0.10930636, 0.89069364],\n",
       "       [0.26890277, 0.73109723],\n",
       "       [0.25522458, 0.74477542],\n",
       "       [0.16677117, 0.83322883],\n",
       "       [0.75394798, 0.24605202],\n",
       "       [0.19737067, 0.80262933],\n",
       "       [0.25124171, 0.74875829],\n",
       "       [0.57525446, 0.42474554],\n",
       "       [0.08175992, 0.91824008],\n",
       "       [0.1149197 , 0.8850803 ],\n",
       "       [0.97314234, 0.02685766],\n",
       "       [0.86614369, 0.13385631],\n",
       "       [0.31587044, 0.68412956],\n",
       "       [0.49581877, 0.50418123],\n",
       "       [0.36592959, 0.63407041],\n",
       "       [0.31335388, 0.68664612],\n",
       "       [0.59903127, 0.40096873],\n",
       "       [0.89646677, 0.10353323],\n",
       "       [0.73961097, 0.26038903],\n",
       "       [0.76612126, 0.23387874],\n",
       "       [0.14410352, 0.85589648],\n",
       "       [0.92894118, 0.07105882],\n",
       "       [0.41420965, 0.58579035],\n",
       "       [0.73122988, 0.26877012],\n",
       "       [0.44705626, 0.55294374],\n",
       "       [0.25922119, 0.74077881],\n",
       "       [0.3241435 , 0.6758565 ],\n",
       "       [0.61423749, 0.38576251]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#模型在测试集上的定量预测结果\n",
    "RF.predict_proba(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0,\n",
       "       0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0,\n",
       "       1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1,\n",
       "       1, 1, 0])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.where(RF.predict_proba(X_test)[:,0] > 0.5,0,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred = RF.predict(X_test)\n",
    "y_pred_proba = RF.predict_proba(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.混淆矩阵"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "sklearn中的metrics模块提供了丰富的模型评估指标，如precison,recall,f1-score,mean_squared_error等。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[32, 12],\n",
       "       [ 4, 43]], dtype=int64)"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import confusion_matrix\n",
    "\n",
    "cf = confusion_matrix(y_test,y_pred,labels = [0,1])\n",
    "cf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "#可视化混淆矩阵\n",
    "\n",
    "import itertools\n",
    "def cnf_matrix_plotter(cm, classes):\n",
    "    \"\"\"\n",
    "    传入混淆矩阵和标签名称列表，绘制混淆矩阵\n",
    "    \"\"\"\n",
    "    # plt.imshow(cm, interpolation='nearest', cmap=plt.cm.Greens)\n",
    "    plt.imshow(cm, interpolation='nearest', cmap=plt.cm.Oranges)\n",
    "    plt.title('Confusion Matrix')\n",
    "    plt.colorbar()\n",
    "    tick_marks = np.arange(len(classes))\n",
    "    plt.xticks(tick_marks, classes, rotation=45)\n",
    "    plt.yticks(tick_marks, classes)\n",
    "\n",
    "    threshold = cm.max() / 2.\n",
    "    for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])):\n",
    "        plt.text(j, i, cm[i, j],\n",
    "                 horizontalalignment=\"center\",\n",
    "                 color=\"white\" if cm[i, j] > threshold else \"black\",\n",
    "                 fontsize=25)\n",
    "\n",
    "    plt.tight_layout()\n",
    "    plt.ylabel('True Label')\n",
    "    plt.xlabel('Predicted Label')\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0K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HYgSXtKei459zlJO2Xt3krS45LelHRJ1jknSZqUxHWTZ7GxYvgxvxZEUhsyj5w9nmzaE9glIt6TNBL4NCL2kLQZ8KykJ4HdgZ2AL5J5Hvt14I/rldsbuBk4MCmrR0QslPTfwJKIuDY57k/A9RExUdLWwBPA54FLgIkRcZmkw4GRRXytN5LrrpF0GJkJe4/O/n7AMuDFJKkvJTOH5X4RsVrS74ETgduLuKa1Yk6KLUMHSdOSz88At5Bp1k6KiPeS7V8Bdq3rLwS6kZnn8UDg7mT6q1mS/tZA+XsDT9eVFRELNxLHYcDOWdNEdpXUJbnGt5JzH5W0qIjv1g0YK2kHMpNqtM3aNy4iFgBIup/MdGxrgC+RSZIAHYC5RVzPWjknxZZheUQMzt6QJISl2ZuAsyPiifWO+xqZZJOLCjgGMt0x+0TE8gZiaeyjU5cDf4+IbyZN9glZ+9YvM5JYx0bEhY28nrVy7lNsPZ4A/iN5RQKSdkxmk34aOD7pc+xHw9NfPQ8cJGlQcm6PZPtnQJes454kMzs1yXF1ifppMk1YJH0V6F5E3N3IvNsG4NT19n1ZUg9JHYCjgGeB8cAxkvrUxSppmyKuZ62ck2Lr8Qcy/YVTJb0K3ESmpfAA8DbwCnAj8I/1T4yIeWT6Ae+X9BLw52TXw8A36wZagP8HDE0Gcl5n7Sj4pcCBkqaSacZ/kCPOlyXNTJbrgKuBKyU9S2bOwmwTgTvIzGR+X0RMTkbLLwaeTKb1Ggf0K/DPyMwTQpiZZXNN0cwsi5OimVkWJ0UzsyxOimZmWZwUzcyyOCmamWVxUjQzy/L/Ad/kl2RvdzLYAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "cnf_matrix_plotter(cf,[0,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "confusion_matrix?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "32 12 4 43\n"
     ]
    }
   ],
   "source": [
    "tn, fp, fn, tp = confusion_matrix(y_test, y_pred).ravel()\n",
    "print(tn,fp,fn,tp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7818181818181819"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import precision_score\n",
    "\n",
    "precision_score(y_test,y_pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "              precision    recall  f1-score   support\n",
      "\n",
      "     Healthy       0.89      0.73      0.80        44\n",
      "     Disease       0.78      0.91      0.84        47\n",
      "\n",
      "   micro avg       0.82      0.82      0.82        91\n",
      "   macro avg       0.84      0.82      0.82        91\n",
      "weighted avg       0.83      0.82      0.82        91\n",
      "\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import classification_report\n",
    "print(classification_report(y_test,y_pred,target_names = ['Healthy','Disease']))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.ROC曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import roc_curve,auc,roc_auc_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.8210831721470019"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "roc_auc_score(y_test,y_pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred_quant = y_pred_proba[:,1]\n",
    "\n",
    "fpr,tpr,thresholds = roc_curve(y_test,y_pred_quant)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEXCAYAAACzhgONAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3deXxU1f3/8dcnQCDIJpZatkDYjewoIBSNWBVwAZcKChatLSJg3WrFgita9evPWtlBtoosiisq1tpqtFUMYAFFUBFUCIvIbtiTnN8f9wbGmGUImdzJzPv5eMwjc7eZTw5hPnPuuedzzTmHiIhIYRKCDkBERKKbEoWIiBRJiUJERIqkRCEiIkVSohARkSIpUYiISJGUKEREpEhKFFKmzGyWmTn/kWNmmWb2jJnVL2DfU81snJl9Y2aHzex7M3vBzNoXsG9FM7vZzJaY2Q9mtsfMlpvZKDM7OYy4Ovnx/K+Q7c7MBhWwfpCZuXzrShyLmSWb2SQz+9rMDpnZJjN7y8z6mZkV93uIRIIShQThP0BdIBm4BugALAjdwcwaAsuAbsBNQDPgIuAI8JGZ9QrZtxLwBvAw8DzQE2gHjAK6AoPDiOlGYBLQ2MzOKOkvdiKx+AlwBdAFuB1oA/wKWAg8CdQ8gbgSS3qsCM45PfQoswcwC/hXvnU3Aw6oEbJuIbA1dF3ItkX+tiR/+Q4gFzirkPc8uZiYqgM/AG2BicDUAvZxwKAC1g/y/hsdXS5RLIABK4FPgYoFbK+Wtx74Bhidb/s0ID1kOR2YDowBtgDf4yWvLwp47UnARyHLnYB/Aln+cS8BjYL+29EjuId6FBIoM6sHXAnk+A/80zMXAeOdc3sLOOwR4FTgfH/5WuAd59zigt7DObermDAGAmudc5/gJbKrzazacf4qeUoaSzu8RPWYcy67gOOyClpfjKuAOsB5eD2bvwMtzOysvB38ns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2qmllh37r7+/v8Eq+y5h6801YD/fVpeKW795pZU+fcp865x/BO4+QfT/gB79TXTzjnsvBKXD+Fd3oox3n3RvjazH7tv5dZePc/rwlscd6NeK7FO+VW0Pu/Bdzk97YwsxZmdlIYry9xTj0KKU/mAK+Z2TK8cYvPC9gnDbjTzI4AWcBvnHPf+1cgzTOzvFM5oyn4vgy7zOxDoAbwW3/d/cBMM/sEr+LmYH/9rX7CysG7N/WbQOhtJd8FRprZCuCRAt7rOWCBH3OegcAkMxuNd0ppPt49oIsyEXjRTzDvcqy38QmQbWYrgVl4Sakx8D/zzm19D/Qr5rVFdHmsSB4zS8e7nHRZ0LGIRBOdehIRkSKpRyEiIkVSj0JERIqkRCEiIkVSohARkSIpUYiISJGUKEREpEj/H4OfFtxg9ns8AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(fpr,tpr)\n",
    "plt.plot([0,1],[0,1],ls = '--',c = '.3')\n",
    "plt.xlim([0.0,1.0])\n",
    "plt.ylim([0.0,1.0])\n",
    "plt.rcParams['font.size'] = 12\n",
    "plt.title('ROC AUC Curve')\n",
    "plt.xlabel('False positive rate')\n",
    "plt.ylabel('True positive rate')\n",
    "plt.grid(True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.绘制Permutatio importance图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <style>\n",
       "    table.eli5-weights tr:hover {\n",
       "        filter: brightness(85%);\n",
       "    }\n",
       "</style>\n",
       "\n",
       "\n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "        <table class=\"eli5-weights eli5-feature-importances\" style=\"border-collapse: collapse; border: none; margin-top: 0em; table-layout: auto;\">\n",
       "    <thead>\n",
       "    <tr style=\"border: none;\">\n",
       "        <th style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">Weight</th>\n",
       "        <th style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">Feature</th>\n",
       "    </tr>\n",
       "    </thead>\n",
       "    <tbody>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 80.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0527\n",
       "                \n",
       "                    &plusmn; 0.0378\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                number_major_vessels\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 84.94%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0352\n",
       "                \n",
       "                    &plusmn; 0.0323\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                chest_pain_type_typical angina\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 86.29%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0308\n",
       "                \n",
       "                    &plusmn; 0.0256\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                thalassemia_fix defect\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 89.16%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0220\n",
       "                \n",
       "                    &plusmn; 0.0197\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                st_slope_downsloping\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 90.73%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0176\n",
       "                \n",
       "                    &plusmn; 0.0176\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                thalassemia_reversable defect\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 91.56%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0154\n",
       "                \n",
       "                    &plusmn; 0.0108\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                st_slope_flat\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 94.29%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0088\n",
       "                \n",
       "                    &plusmn; 0.0323\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                serum_cholestoral\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 95.33%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0066\n",
       "                \n",
       "                    &plusmn; 0.0108\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                age\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 96.49%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0044\n",
       "                \n",
       "                    &plusmn; 0.0108\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                resting_ele_normal\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 96.49%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0044\n",
       "                \n",
       "                    &plusmn; 0.0108\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                exercise_induced_angina_no\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 97.84%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0022\n",
       "                \n",
       "                    &plusmn; 0.0088\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                chest_pain_type_asymptomatic\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 97.84%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0022\n",
       "                \n",
       "                    &plusmn; 0.0088\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                resting_ele_having ST-T wave abnormality\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(120, 100.00%, 97.84%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0.0022\n",
       "                \n",
       "                    &plusmn; 0.0164\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                st_depression\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                thalassemia_normal\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                chest_pain_type_atypical angina\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                thalassemia_unkonwn\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                resting_blood_pressure\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                fasting_blood_sugar_higher than 120\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                sex_male\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "        <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
       "                0\n",
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
       "                sex_female\n",
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "    \n",
       "        \n",
       "            <tr style=\"background-color: hsl(0, 100.00%, 100.00%); border: none;\">\n",
       "                <td colspan=\"2\" style=\"padding: 0 0.5em 0 0.5em; text-align: center; border: none; white-space: nowrap;\">\n",
       "                    <i>&hellip; 6 more &hellip;</i>\n",
       "                </td>\n",
       "            </tr>\n",
       "        \n",
       "    \n",
       "    </tbody>\n",
       "</table>\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "\n",
       "\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import eli5\n",
    "from eli5.sklearn import PermutationImportance\n",
    "\n",
    "per = PermutationImportance(RF,random_state = 1).fit(X_test,y_test)\n",
    "eli5.show_weights(per,feature_names = X_test.columns.tolist())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
